<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/socket/UdpIoServer.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9ad1227260954e346101f3844f0abb3d.html">socket</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">UdpIoServer.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_udp_io_server_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __UDPIOSERVEREX_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __UDPIOSERVEREX_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_udp_server_8h.html">./internal/UdpServer.h</a>&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="keyword">class </span><a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html">   11</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_c_udp_io_server.html">CUdpIoServer</a></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;{</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;    <a class="code" href="class_c_udp_io_server.html#a1a0e5074169384473110368a9c2fe617">delete_class_copy_operator</a>(<a class="code" href="class_c_udp_io_server.html">CUdpIoServer</a>);</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#aba7476fd84b8f6ae5226c806737e742c">   19</a></span>&#160;    <a class="code" href="class_c_udp_io_server.html#aba7476fd84b8f6ae5226c806737e742c">CUdpIoServer</a>(<span class="keywordtype">bool</span> isWriteLog = <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>.<a class="code" href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">Reset</a>(<span class="keyword">new</span> <a class="code" href="class_c_udp_server.html">CUdpServer</a>(isWriteLog));</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    }</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#aa999f1a2010c0133cc8ff58507a8796e">   24</a></span>&#160;    <a class="code" href="class_c_udp_io_server.html#aa999f1a2010c0133cc8ff58507a8796e">~CUdpIoServer</a>() {}</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#ab6375ef4065897ac0207ea4d151c0a7b">   32</a></span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a> <a class="code" href="class_c_udp_io_server.html#ab6375ef4065897ac0207ea4d151c0a7b">Init</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keywordtype">bool</span> isServer = <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a5862a7fd4ea7b754552eedc19cfdaa53">Init</a>(*(<a class="code" href="class_c_socket.html">CSocket</a>*)(&amp;sock), isServer);</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    }</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#ab6977b751a2bcbde7853c0b4579656fe">   46</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_server.html#ab6977b751a2bcbde7853c0b4579656fe">AsyncRecvfrom</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <a class="code" href="class_c_sock_addr.html">CSockAddr</a>* addr, Func func) {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#aeb69d95dd3123fd4f56d565a19fbec67">AsyncRecvfrom</a>(*(<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)(&amp;sock), buff, addr, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadAddrHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    }</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#a0e162dc25b1c1a70986153e13e92809e">   50</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_server.html#a0e162dc25b1c1a70986153e13e92809e">AsyncRecvfrom</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <a class="code" href="class_c_sock_addr.html">CSockAddr</a>* addr, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#aeb69d95dd3123fd4f56d565a19fbec67">AsyncRecvfrom</a>(*(<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)(&amp;sock), buff, addr, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadAddrHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    }</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#ad30ab9dab17e63e370f3a700071ecc34">   64</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_server.html#ad30ab9dab17e63e370f3a700071ecc34">AsyncSendTo</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <a class="code" href="class_c_sock_addr.html">CSockAddr</a>* addr, <span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a304307c8af55a434f960791a3c038d23">AsyncSendTo</a>(*(<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)(&amp;sock), buff, addr, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteAddrHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    }</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#aab22bf72ceac9ac9bbbc1f81b3de0cc3">   68</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_server.html#aab22bf72ceac9ac9bbbc1f81b3de0cc3">AsyncSendTo</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <a class="code" href="class_c_sock_addr.html">CSockAddr</a>* addr, <span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a304307c8af55a434f960791a3c038d23">AsyncSendTo</a>(*(<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)(&amp;sock), buff, addr, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteAddrHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    }</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#ad2577dd5e8331ce337669104debe8cc2">   80</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_server.html#ad2577dd5e8331ce337669104debe8cc2">Post</a>(<span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a57d65bbcd1d3593a1c82ac3765c67ca3">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle_null.html">PostHandleNull&lt;Func&gt;</a>(func)));</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    }</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#a277eeefc4b1368f8868b2e49b11e76ba">   84</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_server.html#a277eeefc4b1368f8868b2e49b11e76ba">Post</a>(<span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a57d65bbcd1d3593a1c82ac3765c67ca3">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle.html">PostHandle&lt;Func&gt;</a>(func)), invoker);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    }</div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#a3488239966f8876f08488e873868eda6">   93</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_udp_io_server.html#a3488239966f8876f08488e873868eda6">Run</a>() {</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a094ecc90a9e5cd326a58928bf48ce08c">Run</a>();</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#adb53d7a1fa2182a80538d188880adc02">  101</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_udp_io_server.html#adb53d7a1fa2182a80538d188880adc02">Run_One</a>() {</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#aed8baba7d9895b6895d9624ee8cb1bf4">Run_One</a>();</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    }</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#ac5ff63dd1a6754b019960a29920d572f">  106</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_server.html#ac5ff63dd1a6754b019960a29920d572f">NotifyStop</a>() {</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a926f304c91aa6e0d66e7fe7f3189f5e6">NotifyStop</a>();</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    }</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#ad4d4e0b20c08f1caf054dc91353a5460">  114</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_udp_io_server.html#ad4d4e0b20c08f1caf054dc91353a5460">IsStop</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a8963defe56982aaff79417667d23da96">IsStop</a>();</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#a6d6f189a31f74d0e6ea700f3298992c7">  119</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_server.html#a6d6f189a31f74d0e6ea700f3298992c7">WaitServerStop</a>() {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>-&gt;<a class="code" href="class_c_udp_server.html#a2242ee6ccbb71fa768ba191c8a61f9a2">WaitServerStop</a>();</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#abfe6724dcb02aa6d623d06789c27286a">  124</a></span>&#160;    <a class="code" href="class_c_basic_service.html">CBasicService</a>* <a class="code" href="class_c_udp_io_server.html#abfe6724dcb02aa6d623d06789c27286a">GetUdpServicePtr</a>() {</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keywordflow">return</span> dynamic_cast&lt;CBasicService*&gt;(<a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>.<a class="code" href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">Get</a>());</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    }</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">  128</a></span>&#160;    <a class="code" href="class_shared_ptr.html">SharedPtr&lt;CUdpServer&gt;</a> <a class="code" href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">_service</a>;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;};</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="preprocessor">#endif // __UDPIOSERVEREX_H__</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_udp_io_server_html"><div class="ttname"><a href="class_c_udp_io_server.html">CUdpIoServer</a></div><div class="ttdoc">udp io无连接服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00011">UdpIoServer.h:11</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_a6d6f189a31f74d0e6ea700f3298992c7"><div class="ttname"><a href="class_c_udp_io_server.html#a6d6f189a31f74d0e6ea700f3298992c7">CUdpIoServer::WaitServerStop</a></div><div class="ttdeci">void WaitServerStop()</div><div class="ttdoc">通知服务停止并等待</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00119">UdpIoServer.h:119</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html"><div class="ttname"><a href="class_c_sock_error.html">CSockError</a></div><div class="ttdoc">套接字错误信息类</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00013">SockError.h:13</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_abfe6724dcb02aa6d623d06789c27286a"><div class="ttname"><a href="class_c_udp_io_server.html#abfe6724dcb02aa6d623d06789c27286a">CUdpIoServer::GetUdpServicePtr</a></div><div class="ttdeci">CBasicService * GetUdpServicePtr()</div><div class="ttdoc">获取底层服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00124">UdpIoServer.h:124</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_adb53d7a1fa2182a80538d188880adc02"><div class="ttname"><a href="class_c_udp_io_server.html#adb53d7a1fa2182a80538d188880adc02">CUdpIoServer::Run_One</a></div><div class="ttdeci">bool Run_One()</div><div class="ttdoc">运行一次服务</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00101">UdpIoServer.h:101</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_a1a0e5074169384473110368a9c2fe617"><div class="ttname"><a href="class_c_udp_io_server.html#a1a0e5074169384473110368a9c2fe617">CUdpIoServer::delete_class_copy_operator</a></div><div class="ttdeci">delete_class_copy_operator(CUdpIoServer)</div></div>
<div class="ttc" id="aclass_c_stream_iteator_html"><div class="ttname"><a href="class_c_stream_iteator.html">CStreamIteator</a></div><div class="ttdef"><b>Definition:</b> <a href="_stream_byte_8h_source.html#l00011">StreamByte.h:11</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_a5862a7fd4ea7b754552eedc19cfdaa53"><div class="ttname"><a href="class_c_udp_server.html#a5862a7fd4ea7b754552eedc19cfdaa53">CUdpServer::Init</a></div><div class="ttdeci">virtual CSockError Init(CSocket &amp;sock, bool isServer)</div><div class="ttdoc">将sock与服务类绑定，一个socket只能绑定一个udp服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00028">UdpServer.cpp:28</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html"><div class="ttname"><a href="class_c_udp_server.html">CUdpServer</a></div><div class="ttdoc">udp服务类，用于连接发送功能 固删除无对端地址的读写函数，若要连接发送功能请使用CUdpClint功能类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8h_source.html#l00014">UdpServer.h:14</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_aab22bf72ceac9ac9bbbc1f81b3de0cc3"><div class="ttname"><a href="class_c_udp_io_server.html#aab22bf72ceac9ac9bbbc1f81b3de0cc3">CUdpIoServer::AsyncSendTo</a></div><div class="ttdeci">void AsyncSendTo(CUdpIoSocket &amp;sock, const CStreamIteator &amp;buff, CSockAddr *addr, const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00068">UdpIoServer.h:68</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr&lt; HandleBase &gt;</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0f15d2d3d2834b0667791f3abfd9e0d7"><div class="ttname"><a href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">SharedPtr::Get</a></div><div class="ttdeci">Ty * Get()</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00202">SharedPtr.h:202</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_a304307c8af55a434f960791a3c038d23"><div class="ttname"><a href="class_c_udp_server.html#a304307c8af55a434f960791a3c038d23">CUdpServer::AsyncSendTo</a></div><div class="ttdeci">virtual void AsyncSendTo(CUdpSocket &amp;sock, const CStreamIteator &amp;buff, CSockAddr *addr, const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个写请求</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00053">UdpServer.cpp:53</a></div></div>
<div class="ttc" id="aclass_c_sock_addr_html"><div class="ttname"><a href="class_c_sock_addr.html">CSockAddr</a></div><div class="ttdoc">协议地址结构体</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00043">SockTools.h:43</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="aclass_c_udp_socket_html"><div class="ttname"><a href="class_c_udp_socket.html">CUdpSocket</a></div><div class="ttdoc">udp套接口</div><div class="ttdef"><b>Definition:</b> <a href="_udp_socket_8h_source.html#l00010">UdpSocket.h:10</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_ad30ab9dab17e63e370f3a700071ecc34"><div class="ttname"><a href="class_c_udp_io_server.html#ad30ab9dab17e63e370f3a700071ecc34">CUdpIoServer::AsyncSendTo</a></div><div class="ttdeci">void AsyncSendTo(CUdpIoSocket &amp;sock, const CStreamIteator &amp;buff, CSockAddr *addr, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00064">UdpIoServer.h:64</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_aba7476fd84b8f6ae5226c806737e742c"><div class="ttname"><a href="class_c_udp_io_server.html#aba7476fd84b8f6ae5226c806737e742c">CUdpIoServer::CUdpIoServer</a></div><div class="ttdeci">CUdpIoServer(bool isWriteLog=false)</div><div class="ttdoc">构造一个udp io服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00019">UdpIoServer.h:19</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_a8963defe56982aaff79417667d23da96"><div class="ttname"><a href="class_c_udp_server.html#a8963defe56982aaff79417667d23da96">CUdpServer::IsStop</a></div><div class="ttdeci">virtual bool IsStop() const</div><div class="ttdoc">服务是否停止</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00096">UdpServer.cpp:96</a></div></div>
<div class="ttc" id="aclass_c_socket_html"><div class="ttname"><a href="class_c_socket.html">CSocket</a></div><div class="ttdoc">套接口类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8h_source.html#l00030">Socket.h:30</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_a57d65bbcd1d3593a1c82ac3765c67ca3"><div class="ttname"><a href="class_c_udp_server.html#a57d65bbcd1d3593a1c82ac3765c67ca3">CUdpServer::Post</a></div><div class="ttdeci">virtual void Post(const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个中断请求</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00063">UdpServer.cpp:63</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html"><div class="ttname"><a href="class_c_udp_io_socket.html">CUdpIoSocket</a></div><div class="ttdoc">用于udp进行io投递的套接字类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00018">UdpIoSocket.h:18</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="aclass_post_handle_html"><div class="ttname"><a href="class_post_handle.html">PostHandle</a></div><div class="ttdoc">用户投递回调</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00242">SockTools.h:242</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_ab6977b751a2bcbde7853c0b4579656fe"><div class="ttname"><a href="class_c_udp_io_server.html#ab6977b751a2bcbde7853c0b4579656fe">CUdpIoServer::AsyncRecvfrom</a></div><div class="ttdeci">void AsyncRecvfrom(CUdpIoSocket &amp;sock, const CStreamIteator &amp;buff, CSockAddr *addr, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00046">UdpIoServer.h:46</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0b0a4c8396bf40f91994f729855c0a5a"><div class="ttname"><a href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">SharedPtr::Reset</a></div><div class="ttdeci">void Reset(Ty *p)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00175">SharedPtr.h:175</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_aeb69d95dd3123fd4f56d565a19fbec67"><div class="ttname"><a href="class_c_udp_server.html#aeb69d95dd3123fd4f56d565a19fbec67">CUdpServer::AsyncRecvfrom</a></div><div class="ttdeci">virtual void AsyncRecvfrom(CUdpSocket &amp;sock, const CStreamIteator &amp;buff, CSockAddr *addr, const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个接收请求</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00043">UdpServer.cpp:43</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_ac5ff63dd1a6754b019960a29920d572f"><div class="ttname"><a href="class_c_udp_io_server.html#ac5ff63dd1a6754b019960a29920d572f">CUdpIoServer::NotifyStop</a></div><div class="ttdeci">void NotifyStop()</div><div class="ttdoc">通知服务停止</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00106">UdpIoServer.h:106</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_aa999f1a2010c0133cc8ff58507a8796e"><div class="ttname"><a href="class_c_udp_io_server.html#aa999f1a2010c0133cc8ff58507a8796e">CUdpIoServer::~CUdpIoServer</a></div><div class="ttdeci">~CUdpIoServer()</div><div class="ttdoc">销毁一个udp服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00024">UdpIoServer.h:24</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_ab6375ef4065897ac0207ea4d151c0a7b"><div class="ttname"><a href="class_c_udp_io_server.html#ab6375ef4065897ac0207ea4d151c0a7b">CUdpIoServer::Init</a></div><div class="ttdeci">CSockError Init(CUdpIoSocket &amp;sock, bool isServer=false)</div><div class="ttdoc">初始化套接字与服务类设备进行绑定</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00032">UdpIoServer.h:32</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_ad4d4e0b20c08f1caf054dc91353a5460"><div class="ttname"><a href="class_c_udp_io_server.html#ad4d4e0b20c08f1caf054dc91353a5460">CUdpIoServer::IsStop</a></div><div class="ttdeci">bool IsStop() const</div><div class="ttdoc">服务是否停止</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00114">UdpIoServer.h:114</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_aed8baba7d9895b6895d9624ee8cb1bf4"><div class="ttname"><a href="class_c_udp_server.html#aed8baba7d9895b6895d9624ee8cb1bf4">CUdpServer::Run_One</a></div><div class="ttdeci">virtual bool Run_One()</div><div class="ttdoc">运行一次服务</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00082">UdpServer.cpp:82</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_a094ecc90a9e5cd326a58928bf48ce08c"><div class="ttname"><a href="class_c_udp_server.html#a094ecc90a9e5cd326a58928bf48ce08c">CUdpServer::Run</a></div><div class="ttdeci">virtual bool Run()</div><div class="ttdoc">运行服务</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00073">UdpServer.cpp:73</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_a277eeefc4b1368f8868b2e49b11e76ba"><div class="ttname"><a href="class_c_udp_io_server.html#a277eeefc4b1368f8868b2e49b11e76ba">CUdpIoServer::Post</a></div><div class="ttdeci">void Post(const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00084">UdpIoServer.h:84</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_a2242ee6ccbb71fa768ba191c8a61f9a2"><div class="ttname"><a href="class_c_udp_server.html#a2242ee6ccbb71fa768ba191c8a61f9a2">CUdpServer::WaitServerStop</a></div><div class="ttdeci">virtual void WaitServerStop()</div><div class="ttdoc">通知服务停止并等待</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00102">UdpServer.cpp:102</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_a9fea8deea1c69dfe4229cfe89d900b47"><div class="ttname"><a href="class_c_udp_io_server.html#a9fea8deea1c69dfe4229cfe89d900b47">CUdpIoServer::_service</a></div><div class="ttdeci">SharedPtr&lt; CUdpServer &gt; _service</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00128">UdpIoServer.h:128</a></div></div>
<div class="ttc" id="aclass_post_handle_null_html"><div class="ttname"><a href="class_post_handle_null.html">PostHandleNull</a></div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00255">SockTools.h:255</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_a3488239966f8876f08488e873868eda6"><div class="ttname"><a href="class_c_udp_io_server.html#a3488239966f8876f08488e873868eda6">CUdpIoServer::Run</a></div><div class="ttdeci">bool Run()</div><div class="ttdoc">运行服务</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00093">UdpIoServer.h:93</a></div></div>
<div class="ttc" id="aclass_c_basic_service_html"><div class="ttname"><a href="class_c_basic_service.html">CBasicService</a></div><div class="ttdoc">服务类 基类</div><div class="ttdef"><b>Definition:</b> <a href="_service_base_8h_source.html#l00015">ServiceBase.h:15</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_ad2577dd5e8331ce337669104debe8cc2"><div class="ttname"><a href="class_c_udp_io_server.html#ad2577dd5e8331ce337669104debe8cc2">CUdpIoServer::Post</a></div><div class="ttdeci">void Post(const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00080">UdpIoServer.h:80</a></div></div>
<div class="ttc" id="aclass_c_udp_io_server_html_a0e162dc25b1c1a70986153e13e92809e"><div class="ttname"><a href="class_c_udp_io_server.html#a0e162dc25b1c1a70986153e13e92809e">CUdpIoServer::AsyncRecvfrom</a></div><div class="ttdeci">void AsyncRecvfrom(CUdpIoSocket &amp;sock, const CStreamIteator &amp;buff, CSockAddr *addr, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_server_8h_source.html#l00050">UdpIoServer.h:50</a></div></div>
<div class="ttc" id="aclass_c_udp_server_html_a926f304c91aa6e0d66e7fe7f3189f5e6"><div class="ttname"><a href="class_c_udp_server.html#a926f304c91aa6e0d66e7fe7f3189f5e6">CUdpServer::NotifyStop</a></div><div class="ttdeci">virtual void NotifyStop()</div><div class="ttdoc">通知服务停止</div><div class="ttdef"><b>Definition:</b> <a href="_udp_server_8cpp_source.html#l00091">UdpServer.cpp:91</a></div></div>
<div class="ttc" id="a_udp_server_8h_html"><div class="ttname"><a href="_udp_server_8h.html">UdpServer.h</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
